//
//  HRSelectIconCell.m
//  Hear
//
//  Created by mac on 2017/3/28.
//  Copyright © 2017年 mac. All rights reserved.
//

#import "HRSelectIconCell.h"
@interface HRSelectIconCell ()
@property (nonatomic, strong)UIImageView *iconImageView;

@end
@implementation HRSelectIconCell
-(instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self)
    {
         [self setupViews];
    }
    return self;
}

- (void)setupViews
{
    if (self.iconImageView) {
        return;
    }
    
    UIImageView *iconImageView = [UIImageView new];
    iconImageView.contentMode = UIViewContentModeScaleAspectFill;
    [self addSubview:(self.iconImageView = iconImageView)];
    iconImageView.backgroundColor = [UIColor whiteColor];
    WeakSelf
    [iconImageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(weakSelf.contentView).offset(30);
        make.bottom.equalTo(weakSelf.contentView).offset(-10);
        make.right.equalTo(weakSelf.contentView).offset(-30);
        make.height.mas_equalTo(100);
    }];
    
}

- (void)configureCellWithPostURL:(NSString *)coverUrl
{
    self.iconImageView.image = [UIImage imageNamed:coverUrl];
    
}


@end
